import org.cllib.math.BigNumber;

public class J16{
	public static void main(String[] args) {
		int numShifts = 1000;
		
		BigNumber two = new BigNumber("2");
		BigNumber bn = new BigNumber("1");
		
		for(int i = 0 ;i < numShifts ; i ++){
			bn = bn.mul(two);
		}
		
		String s = bn.toString();
		int sum = 0;
		for(int i = 0 ;i < s.length() ;i ++){
			sum += Integer.parseInt(s.substring(i , i + 1));
		}	
		
		System.out.println("sum of digits [" + sum + "]");
	}
}